import torchvision
from torch.utils.data import DataLoader
from torch.utils.tensorboard import SummaryWriter

test_set = torchvision.datasets.CIFAR10("../CIFAR10_dataset", train=False, transform=torchvision.transforms.ToTensor(),
                                        download=True)
test_loader = DataLoader(test_set, batch_size=64, shuffle=False, num_workers=0, drop_last=True)
Writer = SummaryWriter("P11")

for epoch in range(2):
    step = 0
    for data in test_loader:
        imgs, targets = data
        Writer.add_images("Epoch: {}".format(epoch), imgs, step)
        step = step + 1

Writer.close()
